#ifndef SSLSERVER_H
#define SSLSERVER_H

#include <QStringList>
#include <QTcpServer>
#include <QSslSocket>
#include <QSslKey>
#include <QList>

class SSLServer : public QTcpServer
{
    Q_OBJECT

public:
    SSLServer(QObject *parent = 0);

    //Get/Set functions for the "message"
    void setMsg(QString msg);
    QString getCMSG();

    //Called from the view class to transfer the msg typed in to the thread class
    //dialog(view)->sslserver(worker)->sslthread(thread)
    //Could also be used to format the sent message
    void carryMsgToThread(QString);

signals:
    //Transfer the message to the thread class
    void transferMessage(QString);

    //Used in carryMsgToThread same functionality...
    void sendMsgToThread(QString);

protected:
    //Each connection has a unique socketDescriptor which is the parameter
    //socketDescriptor is used for setting up a new thread for a particular connection
    void incomingConnection(int socketDescriptor);

public slots:

    //Used for formatting the recieved message
    void getMSG(QString);

private:

    QString message; //what is typed in the line edit


};

#endif
